package gui;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import midlet.MidletCielsa;

/**
 *
 * @author Dikas
 */
public class AltConfirmacion extends Alert{

    private MidletCielsa midlet;
    private Thread hilo;
    
    public AltConfirmacion(MidletCielsa midlet) {
        super("Correcto", "Visita realizada", null, AlertType.CONFIRMATION);
        this.midlet = midlet;
        hilo = new Thread(new HiloInterno()) ;
        hilo.start();
    }
    
    private class HiloInterno implements Runnable{

        public void run() {
            try {
                Thread.sleep(1000);
                LstMenu lm = new LstMenu(midlet);
                lm.setSincronizado(true); // Borrar cuando jale del rms
                FrmReporteVisitasDia frvd = new FrmReporteVisitasDia(midlet,lm);
                midlet.setDisplay(frvd);
            } catch (Exception e) {        
            }
        }
        
    }
    
}
